package com.taoye.thread;

public class Demo11 {
	public static void main(String[] args) throws InterruptedException {
		Demo11Thread t = new Demo11Thread();
		t.start();
		Thread.sleep(50);
		t.interrupt();
	}
}

class Demo11Thread extends Thread {

	@Override
	public void run() {
		try {
			Thread.sleep(1000);
			System.out.println("执行了run方法");
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println("线程执行结束了");
	}
}